/**
 * @copyright 2017 Indie Semiconductor.
 *
 * This file is proprietary to Indie Semiconductor.
 * All rights reserved. Reproduction or distribution, in whole
 * or in part, is forbidden except by express written permission
 * of Indie Semiconductor.
 *
 * @file pmu_device.c
 */

#include <stddef.h>
#include "pmu_device.h"
#include "errno.h"

void BOR_Handler(void) 
{
    
}
   
void PMU_BORInit(Bor1V5Thres_t lowThreshold, Bor3V3Thres_t highThreshold)
{
    CRGA_SFRS->BORCONFIG.BOR1V8THRESH = lowThreshold;
    CRGA_SFRS->BORCONFIG.BOR3V3THRESH = highThreshold;
    CRGA_SFRS->BORCONFIG.BORBIASOVERRIDESEL = 0;
    CRGA_SFRS->BORACTION.VDD1V8 = PMU_BROWNOUT_RESET;
    CRGA_SFRS->BORACTION.VDD3V3 = PMU_BROWNOUT_RESET;
    
}














































